package Algoritmer;

public class Sort 
{
	public void insertion(int A[])
	{
		int key;
		int i;
		
		for (int j = 1; j < A.length; j++) 
		{
			key = A[j];
			i = j - 1;
			
			while((i >= 0) && (A[i] < key))
			{
				A[i +1] = A[i];
				i--;
			}
			A[i+1] = key;
			
		}
		
		for(int tal : A)
		{
			System.out.println(tal);
		}

	}
	
	public void start()
	{
		
	}
	
}
